package io.gitee.chearnee.fw.common.model;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.gitee.chearnee.fw.common.annotation.IBaseEnumJson;
import io.gitee.chearnee.fw.common.component.BaseEnumDeserializer;
import io.gitee.chearnee.fw.common.component.BaseEnumSerializer;

/**
 * 加了@IBaseEnumJson注解的枚举类型，会自动转换为json格式，不加默认直接getValue()
 * @author NN
 */
@JsonDeserialize(using = BaseEnumDeserializer.class)
@JsonSerialize(using = BaseEnumSerializer.class)
public interface IBaseEnum<T> {

  /**
   * @see IBaseEnumJson
   */
  T getValue();
}
